3.550 \(\int \frac{x^{-1+3 n}}{a+b x^n+c x^{2 n}} \, dx\)

Optimal. Leaf size=87 \[ -\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{c^2 n \sqrt{b^2-4 a c}}-\frac{b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n}+\frac{x^n}{c n} \]

[Out]

x^n/(c*n) - ((b^2 - 2*a*c)*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(c^2*Sqrt[b^2 - 4*a*c]*n) - (b*Log[a + b*
x^n + c*x^(2*n)])/(2*c^2*n)

________________________________________________________________________________________

Rubi [A]  time = 0.074099, antiderivative size = 87, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {1357, 703, 634, 618, 206, 628} \[ -\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{c^2 n \sqrt{b^2-4 a c}}-\frac{b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n}+\frac{x^n}{c n} \]

Antiderivative was successfully verified.

[In]

Int[x^(-1 + 3*n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

x^n/(c*n) - ((b^2 - 2*a*c)*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(c^2*Sqrt[b^2 - 4*a*c]*n) - (b*Log[a + b*
x^n + c*x^(2*n)])/(2*c^2*n)

Rule 1357

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && NeQ[
b^2 - 4*a*c, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 703

Int[((d_.) + (e_.)*(x_))^(m_)/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*(d + e*x)^(m - 1))/(c*
(m - 1)), x] + Dist[1/c, Int[((d + e*x)^(m - 2)*Simp[c*d^2 - a*e^2 + e*(2*c*d - b*e)*x, x])/(a + b*x + c*x^2),
 x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*
e, 0] && GtQ[m, 1]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{x^{-1+3 n}}{a+b x^n+c x^{2 n}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{a+b x+c x^2} \, dx,x,x^n\right )}{n}\\ &=\frac{x^n}{c n}+\frac{\operatorname{Subst}\left (\int \frac{-a-b x}{a+b x+c x^2} \, dx,x,x^n\right )}{c n}\\ &=\frac{x^n}{c n}-\frac{b \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^n\right )}{2 c^2 n}+\frac{\left (b^2-2 a c\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^n\right )}{2 c^2 n}\\ &=\frac{x^n}{c n}-\frac{b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n}-\frac{\left (b^2-2 a c\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^n\right )}{c^2 n}\\ &=\frac{x^n}{c n}-\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{c^2 \sqrt{b^2-4 a c} n}-\frac{b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n}\\ \end{align*}

Mathematica [A]  time = 0.128354, size = 80, normalized size = 0.92 \[ \frac{-\frac{\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac{b+2 c x^n}{\sqrt{b^2-4 a c}}\right )}{c \sqrt{b^2-4 a c}}-\frac{b \log \left (a+x^n \left (b+c x^n\right )\right )}{2 c}+x^n}{c n} \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + 3*n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(x^n - ((b^2 - 2*a*c)*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(c*Sqrt[b^2 - 4*a*c]) - (b*Log[a + x^n*(b + c*
x^n)])/(2*c))/(c*n)

________________________________________________________________________________________

Maple [B]  time = 0.091, size = 664, normalized size = 7.6 \begin{align*} -{\frac{b\ln \left ( x \right ) }{{c}^{2}}}+{\frac{{x}^{n}}{cn}}+4\,{\frac{{n}^{2}\ln \left ( x \right ) abc}{4\,a{c}^{3}{n}^{2}-{b}^{2}{c}^{2}{n}^{2}}}-{\frac{{n}^{2}\ln \left ( x \right ){b}^{3}}{4\,a{c}^{3}{n}^{2}-{b}^{2}{c}^{2}{n}^{2}}}-2\,{\frac{ab}{c \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}-1/2\,{\frac{-2\,abc+{b}^{3}+\sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}}}{c \left ( 2\,ac-{b}^{2} \right ) }} \right ) }+{\frac{{b}^{3}}{2\,{c}^{2} \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}-{\frac{1}{2\,c \left ( 2\,ac-{b}^{2} \right ) } \left ( -2\,abc+{b}^{3}+\sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}} \right ) } \right ) }+{\frac{1}{2\,{c}^{2} \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}-{\frac{1}{2\,c \left ( 2\,ac-{b}^{2} \right ) } \left ( -2\,abc+{b}^{3}+\sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}} \right ) } \right ) \sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}}}-2\,{\frac{ab}{c \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}+1/2\,{\frac{2\,abc-{b}^{3}+\sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}}}{c \left ( 2\,ac-{b}^{2} \right ) }} \right ) }+{\frac{{b}^{3}}{2\,{c}^{2} \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}+{\frac{1}{2\,c \left ( 2\,ac-{b}^{2} \right ) } \left ( 2\,abc-{b}^{3}+\sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}} \right ) } \right ) }-{\frac{1}{2\,{c}^{2} \left ( 4\,ac-{b}^{2} \right ) n}\ln \left ({x}^{n}+{\frac{1}{2\,c \left ( 2\,ac-{b}^{2} \right ) } \left ( 2\,abc-{b}^{3}+\sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}} \right ) } \right ) \sqrt{-16\,{a}^{3}{c}^{3}+20\,{a}^{2}{b}^{2}{c}^{2}-8\,a{b}^{4}c+{b}^{6}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+3*n)/(a+b*x^n+c*x^(2*n)),x)

[Out]

-b/c^2*ln(x)+x^n/c/n+4/(4*a*c^3*n^2-b^2*c^2*n^2)*n^2*ln(x)*a*b*c-1/(4*a*c^3*n^2-b^2*c^2*n^2)*n^2*ln(x)*b^3-2/c
/(4*a*c-b^2)/n*ln(x^n-1/2*(-2*a*b*c+b^3+(-16*a^3*c^3+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2))/c/(2*a*c-b^2))*a*b+1
/2/c^2/(4*a*c-b^2)/n*ln(x^n-1/2*(-2*a*b*c+b^3+(-16*a^3*c^3+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2))/c/(2*a*c-b^2))
*b^3+1/2/c^2/(4*a*c-b^2)/n*ln(x^n-1/2*(-2*a*b*c+b^3+(-16*a^3*c^3+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2))/c/(2*a*c
-b^2))*(-16*a^3*c^3+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2)-2/c/(4*a*c-b^2)/n*ln(x^n+1/2*(2*a*b*c-b^3+(-16*a^3*c^3
+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2))/c/(2*a*c-b^2))*a*b+1/2/c^2/(4*a*c-b^2)/n*ln(x^n+1/2*(2*a*b*c-b^3+(-16*a^
3*c^3+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2))/c/(2*a*c-b^2))*b^3-1/2/c^2/(4*a*c-b^2)/n*ln(x^n+1/2*(2*a*b*c-b^3+(-
16*a^3*c^3+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2))/c/(2*a*c-b^2))*(-16*a^3*c^3+20*a^2*b^2*c^2-8*a*b^4*c+b^6)^(1/2
)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{b \log \left (x\right )}{c^{2}} + \frac{x^{n}}{c n} - \int -\frac{a b +{\left (b^{2} - a c\right )} x^{n}}{c^{3} x x^{2 \, n} + b c^{2} x x^{n} + a c^{2} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

-b*log(x)/c^2 + x^n/(c*n) - integrate(-(a*b + (b^2 - a*c)*x^n)/(c^3*x*x^(2*n) + b*c^2*x*x^n + a*c^2*x), x)

________________________________________________________________________________________

Fricas [A]  time = 1.69275, size = 633, normalized size = 7.28 \begin{align*} \left [-\frac{{\left (b^{2} - 2 \, a c\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{2 \, n} + b^{2} - 2 \, a c + 2 \,{\left (b c + \sqrt{b^{2} - 4 \, a c} c\right )} x^{n} + \sqrt{b^{2} - 4 \, a c} b}{c x^{2 \, n} + b x^{n} + a}\right ) - 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x^{n} +{\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} n}, -\frac{2 \,{\left (b^{2} - 2 \, a c\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{2 \, \sqrt{-b^{2} + 4 \, a c} c x^{n} + \sqrt{-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right ) - 2 \,{\left (b^{2} c - 4 \, a c^{2}\right )} x^{n} +{\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} n}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

[-1/2*((b^2 - 2*a*c)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^(2*n) + b^2 - 2*a*c + 2*(b*c + sqrt(b^2 - 4*a*c)*c)*x^n +
sqrt(b^2 - 4*a*c)*b)/(c*x^(2*n) + b*x^n + a)) - 2*(b^2*c - 4*a*c^2)*x^n + (b^3 - 4*a*b*c)*log(c*x^(2*n) + b*x^
n + a))/((b^2*c^2 - 4*a*c^3)*n), -1/2*(2*(b^2 - 2*a*c)*sqrt(-b^2 + 4*a*c)*arctan(-(2*sqrt(-b^2 + 4*a*c)*c*x^n
+ sqrt(-b^2 + 4*a*c)*b)/(b^2 - 4*a*c)) - 2*(b^2*c - 4*a*c^2)*x^n + (b^3 - 4*a*b*c)*log(c*x^(2*n) + b*x^n + a))
/((b^2*c^2 - 4*a*c^3)*n)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+3*n)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{3 \, n - 1}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+3*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate(x^(3*n - 1)/(c*x^(2*n) + b*x^n + a), x)